<link rel="stylesheet" href="../../css/mineorder.css">
<div class="body">
    <% Date.prototype.Format = function (fmt) { //author: meizz
        var o = {
            "M+": this.getMonth() + 1,                 //月份
            "d+": this.getDate(),                    //日
            "h+": this.getHours(),                   //小时
            "m+": this.getMinutes(),                 //分
            "s+": this.getSeconds(),                 //秒
            "q+": Math.floor((this.getMonth() + 3) / 3), //季度
            "S": this.getMilliseconds()             //毫秒
        };
        if (/(y+)/.test(fmt))
            fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
        for (var k in o)
            if (new RegExp("(" + k + ")").test(fmt))
                fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
        return fmt;
    }
    %>
    <%for(var i=0;i<data.length;i++){ %>
    <ul id="<%=data[i].id%>">
        <% var amounts=0,num=0;for(var j=0;j<data2.length;j++){if(data[i].id == data2[j].payid){%>
        <li>
            <div class="goods-img">
                <img src="<%=data2[j].goodimg%>" width="100%">
            </div>
            <div class="goods-desc">
                <p class="desc-name"><%=data2[j].name%></p>
                <p class="desc-type"><span><%=new Date(data2[j].starttime).Format('MM.dd')%>-<%=new Date(data2[j].endtime).Format('MM.dd')%></span></p>
            </div>
            <div class="goods-price">
                <p class="price">￥<%=data2[j].price%></p>
                <p class="num"><span>x<%=data2[j].count%></span></p>
                <span style="display: none"><%= amounts+=parseFloat(data2[j].price).toFixed(2)*parseInt(data2[j].count)%></span>
                <span style="display: none"><%= num+=parseInt(data2[j].count)%></span>
            </div>
        </li>
        <%}%>
        <%}%>
        <div class="statistics">
            <p>共<span class="nums"><%=num%></span>个商品 合计：
                <span>￥</span>
                <span class="total">
                        <%=amounts%>
                </span>
            </p>
        </div>
        <div class="del-button" onclick="MINEORDER.del('<%=data[i].id%>')">删除订单</div>
        <%if(data[i].isdeposit==1&&data[i].ispayment!=1){%>
        <div class="deal-button" onclick="">待付款</div>
        <%}else if(data[i].isdeposit==1&&data[i].ispayment==1){%>
        <div class="dealed-button">已付款</div>
        <%}%>
    </ul>
    <%}%>


    <div class="bottom" style="width: 100%;height: 70px;"></div>
</div>